x86/boot: re-arrange how/when we do disk I/O
authorJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 08:41:10 +0000 (10:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 13 Jun 2017 08:41:10 +0000 (10:41 +0200)
commit5ec164fd61bd8fc7adfb1ca2907d9159eeb1e37b
tree769c6d9cdab81213dbbe282d4deaf9ceaaecd7b5
parent7f679c4fedb5ca0712c88ac32ba1f62f91a3d10e
x86/boot: re-arrange how/when we do disk I/O

We place the trampoline no lower than at 256k, so we have ample space
to read the MBRs of BIOS disks into an aligned buffer right below the
trampoline (not doing so has been found to be a problem on a buggy BIOS
coming with a Skull Canyon NUC). To facilitate that move MBR reading
past EDD info retrieval.

Also add a wrap check to the EDD info retrieval loop, to match that in
the MBR reading one.

Reported-by: Paul Durrant <Paul.Durrant@citrix.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Paul Durrant <Paul.Durrant@citrix.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/boot/edd.S